import { defineStore } from 'pinia';

export const useUserStore = defineStore('user', {
  state: () => ({
    username: 'Guest',
    isLoggedIn: false
  }),
  actions: {
    login(username) {
      this.username = username;
      this.isLoggedIn = true;
    },
    logout() {
      this.username = 'Guest';
      this.isLoggedIn = false;
    }
  }
});
